package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the COURSE_TEAM database table.
 * 
 */
@Entity
@Table(name="COURSE_TEAM")
@NamedQuery(name="CourseTeam.findAll", query="SELECT c FROM CourseTeam c")
public class CourseTeam implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="COURSE_TEAM_COURTID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="COURSE_TEAM_COURTID_GENERATOR")
	@Column(name="COURT_ID")
	private long courtId;

	@Column(name="COURT_CREATORDATE")
	private Timestamp courtCreatordate;

	@Column(name="COURT_FINITION")
	private String courtFinition;

	@Column(name="COURT_NAME")
	private String courtName;

	@Column(name="COURT_PERSON")
	private String courtPerson;

	@Column(name="COURT_REMARK")
	private String courtRemark;

	@Column(name="COURT_UPDATEDATE")
	private Timestamp courtUpdatedate;

	//bi-directional many-to-one association to ClassDy
	@OneToMany(mappedBy="courseTeam")
	@JSONField(serialize=false)
	private List<ClassDy> classDies;

	public CourseTeam() {
	}

	public long getCourtId() {
		return this.courtId;
	}

	public void setCourtId(long courtId) {
		this.courtId = courtId;
	}

	public Timestamp getCourtCreatordate() {
		return this.courtCreatordate;
	}

	public void setCourtCreatordate(Timestamp courtCreatordate) {
		this.courtCreatordate = courtCreatordate;
	}

	public String getCourtFinition() {
		return this.courtFinition;
	}

	public void setCourtFinition(String courtFinition) {
		this.courtFinition = courtFinition;
	}

	public String getCourtName() {
		return this.courtName;
	}

	public void setCourtName(String courtName) {
		this.courtName = courtName;
	}

	public String getCourtPerson() {
		return this.courtPerson;
	}

	public void setCourtPerson(String courtPerson) {
		this.courtPerson = courtPerson;
	}

	public String getCourtRemark() {
		return this.courtRemark;
	}

	public void setCourtRemark(String courtRemark) {
		this.courtRemark = courtRemark;
	}

	public Timestamp getCourtUpdatedate() {
		return this.courtUpdatedate;
	}

	public void setCourtUpdatedate(Timestamp courtUpdatedate) {
		this.courtUpdatedate = courtUpdatedate;
	}

	public List<ClassDy> getClassDies() {
		return this.classDies;
	}

	public void setClassDies(List<ClassDy> classDies) {
		this.classDies = classDies;
	}

	public ClassDy addClassDy(ClassDy classDy) {
		getClassDies().add(classDy);
		classDy.setCourseTeam(this);

		return classDy;
	}

	public ClassDy removeClassDy(ClassDy classDy) {
		getClassDies().remove(classDy);
		classDy.setCourseTeam(null);

		return classDy;
	}

}